package com.example.jdbc;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

@Repository
public class TestTxDao {
    @Autowired
    private JdbcTemplate jdbcTemplate;

    public void t1() {
        jdbcTemplate.update("UPDATE `myemployees`.`book` SET `price` = 23 where id = 10" );
    }

    public void t2() {
        jdbcTemplate.update("UPDATE `myemployees`.`book` SET `price` = 203 where id = 10");
    }


    public void t3() {
        jdbcTemplate.update("UPDATE `myemployees`.`book` SET `price` = 230 where id = 13" );
    }

    public void t4() {
        jdbcTemplate.update("UPDATE `myemployees`.`book` SET `price` = 2300 where id = 13" );
    }

}

